<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib uri="/WEB-INF/FCKeditor.tld" prefix="FCK"%>
<html>
<head>
<title>更新文章</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
<script type="text/javascript">
	function FCKeditor_OnComplete(editorInstance) {
		window.status = editorInstance.Description;
	}
</script>
</head>
<body>
<table style="width: 1024px;" align="center">
	<tr>
		<td><s:include value="/common/header.jsp" />
		<div style="height: 500px;">
		<s:actionmessage /> 
		<s:form action="/article/%{article.id}" namespace="/">
			<s:hidden name="_method" value="put" />
			<s:textfield key="articleTitle" label="标题" value="%{article.title}"/>
			<s:hidden key="categoryId" value="%{category.id}"/>
			<s:hidden key="articleId" value="%{article.id}"/>
			<s:if test="category.subCategorys!=null && category.subCategorys.size>0">
				<s:select list="category.subCategorys" key="subCategoryId" value="%{article.category.id}"
					label="分类" listKey="id" listValue="categoryName"/>
			</s:if>
			<table>
				<tr><td>
					<FCK:editor instanceName="articleContent" height="400" width="800">
						<jsp:attribute name="value">
							<s:property value="%{#request.articleContent}" escape="false"/>
						</jsp:attribute>
					</FCK:editor>
				</td></tr>
			</table>
			<s:iterator value="article.attachmentsSet">
				<s:property value="fileName"/>
			</s:iterator>
			<s:submit />
		</s:form></div>
		<s:include value="/common/footer.jsp" /></td>
	</tr>
</table>
</body>
</html>